<?php
class GuildMemberInfoVo extends SzAbstractMySqlVo
{

    private $id;
    private $userId;
    private $position;
    private $money;
    private $donateTimes;
    private $donateTime;

    /**
     * Initialize GuildMemberInfoVo.
     *
     * @param $id
     * @param $userId
     * @param $position
     * @param $money
     * @param $donateTimes
     * @param $donateTime
     * @param boolean $isInsert default false, means for now this vo is initialized not for insert process
     * @return GuildMemberInfoVo
     */
    public function __construct($id, $userId, $position, $money, $donateTimes, $donateTime, $isInsert = false) {
        $this->id = $id;
        $this->userId = $userId;
        $this->position = $position;
        $this->money = $money;
        $this->donateTimes = $donateTimes;
        $this->donateTime = $donateTime;

        $this->isInsert = $isInsert;
        $this->voClassName = 'GuildMemberInfoVo';
        $this->ormName = 'GuildMemberInfo';
    }

    /**
     * @see SzAbstractVo::toArray
     */
    public function toArray($needEncode = false)
    {
        return array(
            'id' => $this->getId(),
            'userId' => $this->getUserId(),
            'position' => $this->getPosition(),
            'money' => $this->getMoney(),
            'donateTimes' => $this->getDonateTimes(),
            'donateTime' => $this->getDonateTime(),
        );
    }

    /**
     * @see SzAbstractVo::toEntireArray
     */
    public function toEntireArray($needEncode = false)
    {
        return array(
            'id' => $this->getId(),
            'userId' => $this->getUserId(),
            'position' => $this->getPosition(),
            'money' => $this->getMoney(),
            'donateTimes' => $this->getDonateTimes(),
            'donateTime' => $this->getDonateTime(),
        );
    }

    /**
     * @see SzAbstractVo::toPureArray
     */
    public function toPureArray()
    {
        return array(
            $this->getId(),
            $this->getUserId(),
            $this->getPosition(),
            $this->getMoney(),
            $this->getDonateTimes(),
            $this->getDonateTime(),
        );
    }

    public function getId()
    {
        return $this->id;
    }

    public function setId($val)
    {
        $this->saveColumnStatus(0, $this->id);
        $this->id = $val;
    }

    public function getUserId()
    {
        return $this->userId;
    }

    public function setUserId($val)
    {
        $this->saveColumnStatus(1, $this->userId);
        $this->userId = $val;
    }

    public function getPosition()
    {
        return $this->position;
    }

    public function setPosition($val)
    {
        $this->saveColumnStatus(2, $this->position);
        $this->position = $val;
    }

    public function getMoney()
    {
        return $this->money;
    }

    public function setMoney($val)
    {
        $this->saveColumnStatus(3, $this->money);
        $this->money = $val;
    }

    public function getDonateTimes()
    {
        return $this->donateTimes;
    }

    public function setDonateTimes($val)
    {
        $this->saveColumnStatus(4, $this->donateTimes);
        $this->donateTimes = $val;
    }

    public function getDonateTime()
    {
        return $this->donateTime;
    }

    public function setDonateTime($val)
    {
        $this->saveColumnStatus(5, $this->donateTime);
        $this->donateTime = $val;
    }

    public function updateMoney($val)
    {
        $this->saveColumnStatus(3, $this->money);
        $this->money += $val;
    }

}